package ynu.edu.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import ynu.edu.common.entity.LogicEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

@Entity
@Getter
@Setter
public class LineItem extends LogicEntity {
    @Column
    private Integer amount;
    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnore
//    @JsonIgnoreProperties(value = {"lineItems"})
    private Order1 order1;
    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"lineItems"})
    private ShopItem shopItem;

}
